/* 通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    line-height: 1.6;
}

/* 导航栏 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #00d4aa;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #00d4aa;
}

.login-btn {
    background: #00d4aa;
    color: black;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s;
}

.login-btn:hover {
    transform: translateY(-2px);
}

/* 首页样式 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 5%;
    margin-top: 80px;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #00d4aa, #00a8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    border: 2px solid #00d4aa;
}

.btn-primary {
    background: #00d4aa;
    color: black;
}

.btn-secondary {
    background: transparent;
    color: #00d4aa;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 212, 170, 0.3);
}

.features {
    padding: 5rem 5%;
    background: rgba(255, 255, 255, 0.05);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #00d4aa;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer {
    text-align: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.8);
    margin-top: 5rem;
}

/* 聊天页面样式 */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 80px auto 0;
    width: 100%;
    height: calc(100vh - 80px);
    padding: 1rem;
}

.chat-header {
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem 2rem;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-radius: 10px;
}

.chat-header h1 {
    color: #00d4aa;
    font-size: 1.5rem;
}

.back-btn {
    color: #00d4aa;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid #00d4aa;
    border-radius: 5px;
    transition: all 0.3s;
}

.back-btn:hover {
    background: #00d4aa;
    color: black;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    max-width: 80%;
}

.user-message {
    align-self: flex-end;
}

.ai-message {
    align-self: flex-start;
}

.message-bubble {
    padding: 1rem 1.5rem;
    border-radius: 18px;
    line-height: 1.5;
    word-wrap: break-word;
}

.user-bubble {
    background: #00d4aa;
    color: black;
    border-bottom-right-radius: 5px;
}

.ai-bubble {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #333;
    border-bottom-left-radius: 5px;
}

.chat-input-container {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid #333;
}

.chat-input {
    flex: 1;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #444;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    resize: none;
    height: 60px;
    font-family: inherit;
}

.chat-input:focus {
    outline: none;
    border-color: #00d4aa;
}

.send-btn {
    background: #00d4aa;
    color: black;
    border: none;
    padding: 0 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.3s;
}

.send-btn:hover {
    transform: translateY(-2px);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.typing-indicator {
    display: none;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    border-bottom-left-radius: 5px;
    align-self: flex-start;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #00d4aa;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .message {
        max-width: 90%;
    }
    
    .chat-container {
        margin: 60px auto 0;
        height: calc(100vh - 60px);
        padding: 0.5rem;
    }

    .upload-btn {
    background: #666;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
}

.upload-btn:hover {
    background: #00d4aa;
}

.upload-progress {
    background: rgba(0, 212, 170, 0.2);
    padding: 0.5rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    text-align: center;
}

/* ===== 文件上传相关样式 ===== */
/* 上传按钮样式 */
.upload-btn {
    background: #666;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.upload-btn:hover {
    background: #00d4aa;
}

.file-input-hidden {
    display: none;
}

/* 上传进度样式 */
.upload-progress {
    background: rgba(0, 212, 170, 0.2);
    padding: 0.8rem;
    border-radius: 8px;
    margin: 0.5rem 0;
    text-align: center;
    border: 1px solid rgba(0, 212, 170, 0.3);
    font-size: 0.9rem;
}

/* 保存凭证按钮样式 */
.save-credentials-btn {
    background: linear-gradient(135deg, #00d4aa 0%, #00a8ff 100%);
    color: black;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    margin: 0.5rem 0;
    transition: all 0.3s ease;
    display: inline-block;
}

.save-credentials-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.4);
}

/* 文件选择提示 */
.file-selected {
    color: #00d4aa;
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

/* 聊天输入容器适配上传按钮 */
.chat-input-container {
    display: flex;
    gap: 0.8rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid #333;
    align-items: center;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .chat-input-container {
        flex-wrap: wrap;
    }
    
    .upload-btn {
        order: -1;
        margin-bottom: 0.5rem;
    }
    
    .chat-input {
        order: 1;
        flex: 1 0 100%;
    }
    
    .send-btn {
        order: 2;
    }
}
}